Skip to content

Conversation

cyisfor
Copy link

@cyisfor cyisfor commented Aug 5, 2015

For instance the Rust documentation (reference.md) uses markdown that specifies CSS classes for fenced code, like ```{.classa .classb} which produces unbalanced fenced code currently. This should fix it so those classes are parsed and added to the resulting HTML, and the fenced code isn't made unbalanced.

Also removed that LANG_TAG substitution, since assuming the name of the class attribute in HTML to be "class" is pretty safe to make, plus not all CSS classes are only for specifying language highlighting.

No syntax errors in python2.7, python3.4 or pypy3

The Rust documentation uses markdown that specifies CSS classes for fenced code, like ```{.classa .classb} which produces unbalanced fenced code currently. This should fix it so those classes are parsed and added to the resulting HTML, and the fenced code isn't made unbalanced.

Also removed that LANG_TAG substitution, since assuming the name of the class attribute in HTML to be "class" is pretty safe to make, plus not all CSS classes are only for specifying language highlighting.

No syntax errors in python2.7, python3.4 or pypy3
@cyisfor
Copy link
Author

cyisfor commented Aug 5, 2015

and of course another file in the Rust doc also decides to use some weird ```lang,class,class syntax, but I give up. -_-

@waylan
Copy link
Member

waylan commented Aug 5, 2015

@cyisfor that you for your contribution. However, before I accept your patch, I have a few concerns I would like to address:

What do you mean by unbalanced? I don't see any invalid HTML so you must be referring to something else.

Also, could you include a test to demonstrate that your change works. Specifically, a test that fails before the change is applied and passes after.

Additionally, is appears that you broke an existing test. There are a large number of existing users who are expecting the current output (and they already have existing CSS which works with it). If we change the output, we will break their sites when they upgrade. Is the proposed change worth it?

It also appears that you need to clean up your code to be flake8 compliant.

And finally, read carefully over my analysis of how code blocks should be marked up in HTML. Anything that does not fit that model is likely to be rejected.

@waylan
Copy link
Member

waylan commented Sep 5, 2015

Given that lack of response on this issue, I'm closing this for now. I'll reconsider if and when the issues I raised are addressed.

@waylan waylan closed this Sep 5, 2015
@cyisfor
Copy link
Author

cyisfor commented Sep 20, 2015

Yeah sorry, I just don't have a reason to do this outside of one rather stupid documentation package that just isn't worth it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants